package com.chb.dao;

import com.chb.model.entity.OutLibray;
import com.chb.model.vo.GoodsCountVo;
import com.chb.model.vo.OutLibrayVo;
import com.chb.model.vo.StaffPriceCountVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @author: 陈海彬
 * @date: Created in 2023/9/28 22:22
 * @description:
 * @modified By:
 * @version:
 */
public interface OutLibrayDao {

    /**
     * 添加出库商品
     */
    public Integer addOutLibray(OutLibray outLibray);

    /**
     * 根据分店id查找入库信息
     */
    public List<OutLibrayVo> findOutLibrayByBranchid(@Param("staffid") Integer staffid, @Param("branchid") Integer branchid, @Param("status") Integer status);

    /**
     * 修改出库信息
     */
    public void updateOutLibray(OutLibray outLibray);

    /**
     * 获取当前分店的营业额
     *
     * @param branchId 分店id
     * @param begin
     * @param end
     * @return
     */
    public BigDecimal getBusinessCount(@Param("branchId") Integer branchId,
                                       @Param("begin") Date begin,
                                       @Param("end") Date end);

    /**
     * 获取各分店营销额统计
     */
    public List<StaffPriceCountVo> getAllCountPriceByBranch(@Param("begin") Date begin,
                                                            @Param("end") Date end);

    /**
     * 查询各商品销量统计
     *
     * @param branchId 分店id
     * @param begin
     * @param end
     * @return
     */
    public List<GoodsCountVo> getGoodsCountByBranchId(@Param("branchId") Integer branchId,
                                                      @Param("begin") Date begin,
                                                      @Param("end") Date end);
}
